/*
 * config.h
 *
 *  Created on: Jan 14, 2014
 *      Author: jqc
 */

#ifndef CONFIG_H_
#define CONFIG_H_

#define DEBUG_SWITCH	0

#define LEN_KEY_MAX		32
#define LEN_VAL_MAX		128
#define LEN_CTNT_MAX	1024
#define LEN_PATH_MAX	128

#define CMD_ADD		0
#define CMD_DEL		1
#define CMD_MOD		2
#define CMD_QUR		3

#define TLINE_NCONF	0
#define TLINE_CONF	1

#define DEF_CONF_PATH	"/opt/coloro/app.config"

typedef struct {
	char key[LEN_KEY_MAX];
	char val[LEN_VAL_MAX];
} CONFIGITEM;

typedef union {
	char notConf[LEN_CTNT_MAX];
	CONFIGITEM conf;
} CONTENT;

typedef struct {
	int type;
	CONTENT ctnt;
} LINE;

typedef LINE data_t;

typedef struct _node_ {
	data_t data;
	struct _node_ *next;
} NODE;

#endif /* CONFIG_H_ */
